home *** CD-ROM | disk | FTP | other *** search
- Path: nntphost.dur.ac.uk!nntp
- From: "Fred H.-M. Chen" <H.M.Chen@durham.ac.uk>
- Newsgroups: comp.lang.c++
- Subject: fstream problem
- Date: Tue, 30 Jan 1996 20:35:33 +0000
- Organization: University of Durham, Durham, UK
- Message-ID: <310E8115.41C67EA6@durham.ac.uk>
- NNTP-Posting-Host: tann-4.dur.ac.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (X11; I; SunOS 4.1.3_U1 sun4m)
-
- Dear C++ Users,
-
- These days I tried to use file io stream. I wrote my own class for
- some simple manupulations. I am using g++ with gcc version 2.7.2 and
- newest version g++lib. During compiling, everything is O.K., it caused
- segmentation fault. After I check my program with gdb, a very strange
- message show as following:
-
- Breakpoint 1, main () at fgngen.cc:20
- 20 Record myRecFile("./data/test.dat", STORE);
- (gdb) l
- 15 main()
- 16 {
- 17 int step;
- 18 double tmp, tmp1, tmp2;
- 19
- 20 Record myRecFile("./data/test.dat", STORE);
- 21
- 22 FGN fgnSeq = FGN(10, 700, 0.5);
- 23
- 24 /*
- (gdb) s
- Record::Record (this=0xeffffb28, name=0x2290 "./data/test.dat",
- mytype=STORE)
- at record.cc:5
- 5 {
- (gdb) s
- fstream::fstream (this=0xeffffb34, __in_chrg=1) at ./fstream.h:83
- ./fstream.h:83: No such file or directory.
- (gdb)
-
- From the message I guess the system should check the director
- /usr/local/lib/g++-include to refer fstream.h. Could anyone tell me
- what's wrong with it?
-
- thanks in advance.
-